<div class="background">
  <div class="login-container">
    <div class="title-box">
      管理后台
    </div>
    <div class="login-box">
      <div class="logo">
        <img src="assets/images/favicon.ico">
      </div>
      <form #formAdd="ngForm" novalidate role="form" (ngSubmit)="formAdd.form.valid && login()">

        <div class="login-body">
          <div class="ui-g">
            <div class="ui-g-12">
              <span class="fa fa-user"></span>
              <input type="text" pInputText
                     placeholder="默认用户:binbinadmin"
                     [(ngModel)]="nameModel"
                     name="nameMode"
                     required
                     (focus)="inputFocus()"
                     #nameMode="ngModel"
              >
            </div>
          </div>
          <div class="ui-g error-input-msg">
            <div class="ui-g-12" *ngIf="formAdd.submitted && !nameMode.valid">
              <i class="fa fa-times-circle mr5"></i>请输入账户
            </div>
          </div>
          <div class="ui-g">
            <div class="ui-g-12">
              <span class="fa fa-unlock-alt "></span>
              <input type="password" pInputText
                     placeholder="请输入密码"
                     [(ngModel)]="psModel"
                     name="psMode"
                     required
                     (focus)="inputFocus()"
                     #psMode="ngModel">
            </div>
          </div>
          <div class="ui-g error-input-msg">
            <div class="ui-g-12" *ngIf="formAdd.submitted && !psMode.valid">
              <i class="fa fa-times-circle mr5"></i>请输入密码
            </div>
          </div>
          <div class="ui-g error-input-msg">
            <div class="ui-g-12">
              {{loginerrortext}}
            </div>
          </div>
          <button class="btn login-btn" type="submit">{{btnLogin}}</button>
        </div>
      </form>

    </div>
  </div>
</div>
